/*
 * Copyright (c) 2018-2024 北京华恒盛世科技有限公司
 * QUICKPOOL is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *     http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
*/

#ifndef ECHKPNT_LIB_H
#define ECHKPNT_LIB_H

#include <netdb.h>
#include <string.h>
#include <ctype.h>

#include "common.h"
#include "../quickpool.h"
 
#define  ECHKPNT_PROGRAM                      "echkpnt"
#define  ERESTART_PROGRAM                     "erestart"

#define  ECHKPNT_CHKPNT_DIR                   "QP_CHKPNT_DIR"

#define  ECHKPNT_OPEN_OUTPUT                  "Y"
#define  ECHKPNT_OPEN_OUTPUT_L                "y"
#define  ECHKPNT_DEFAULT_METHOD               ((char *)"default")

#define  ECHKPNT_LOG_FILENAME                 "chkpnt.log"

#define  ECHKPNT_FILE_MODE                    (S_IRUSR | S_IWUSR)

char  *getEchkpntMethodDir(char *, const char *, const char *);
int   getChkpntDirFile(char *, const char *);
int   initLog(char *);
void  logMesg(const char *);
void  closeLog();
void  setMesgHeader(char *);


#endif 
